home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
encryp
/
encrypt.frm
< prev
next >
Wrap
Text File
|
1995-05-02
|
4KB
|
118 lines
VERSION 2.00
Begin Form Formcrypt
BackColor = &H00C0C0C0&
Caption = "Encrypt/Decrypt Example"
ClientHeight = 1905
ClientLeft = 1725
ClientTop = 3375
ClientWidth = 5220
Height = 2310
Left = 1665
LinkTopic = "Form1"
ScaleHeight = 1905
ScaleWidth = 5220
Top = 3030
Width = 5340
Begin TextBox TextKey
BackColor = &H00C0C0C0&
Height = 285
Left = 1440
TabIndex = 9
Text = "SECRET STRING"
Top = 60
Width = 3675
End
Begin CommandButton CommandQuit
Cancel = -1 'True
Caption = "&Quit"
Height = 350
Left = 4140
TabIndex = 7
Top = 1500
Width = 1000
End
Begin CommandButton CommandExecute
Caption = "&Execute"
Default = -1 'True
Height = 350
Left = 3060
TabIndex = 6
Top = 1500
Width = 1000
End
Begin TextBox TextInput
BackColor = &H00C0C0C0&
Height = 285
Left = 1440
TabIndex = 1
Text = "Encyrpt This"
Top = 435
Width = 3675
End
Begin Label LabelKey
BackStyle = 0 'Transparent
Caption = "Encrypt &Key"
Height = 255
Left = 60
TabIndex = 8
Top = 90
Width = 1095
End
Begin Label Label2
BackStyle = 0 'Transparent
Caption = "Decrypted"
Height = 255
Left = 60
TabIndex = 4
Top = 1125
Width = 1095
End
Begin Label Label1
BackStyle = 0 'Transparent
Caption = "Encrypted"
Height = 255
Left = 60
TabIndex = 2
Top = 780
Width = 1095
End
Begin Label LabelDecrypt
BackColor = &H00C0C0C0&
BorderStyle = 1 'Fixed Single
Height = 255
Left = 1440
TabIndex = 5
Top = 1155
Width = 3675
End
Begin Label LabelEncrypt
BackColor = &H00C0C0C0&
BorderStyle = 1 'Fixed Single
Height = 255
Left = 1440
TabIndex = 3
Top = 810
Width = 3675
End
Begin Label LabelText
BackStyle = 0 'Transparent
Caption = "&String"
Height = 255
Left = 60
TabIndex = 0
Top = 435
Width = 1095
End
End
Option Explicit
Sub CommandExecute_Click ()
FormCrypt.LabelEncrypt.Caption = crypt("E", RTrim$(FormCrypt.TextKey.Text), RTrim$(FormCrypt.TextInput.Text))
FormCrypt.LabelDecrypt.Caption = crypt("D", RTrim$(FormCrypt.TextKey.Text), RTrim$(FormCrypt.LabelEncrypt.Caption))
End Sub
Sub CommandQuit_Click ()
Unload FormCrypt
End Sub